/**
 * 所有版权归 广西梧州 陈锦韬 所有
 *
 * @Title: HbbtvMimeMappingConfig
 * @Package com.rx.bean
 * @Description: MIME
 * @author: 陈锦韬
 * @date: 2022/2/27
 * @version V1.0
 * @Copyright: 2022 陈锦韬  All rights reserved.
 */
package com.rx.bean;

import org.springframework.boot.web.server.MimeMappings;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.context.annotation.Configuration;

/**
 * @author: CHENJINTAO170
 * @Description: MIME
 * @date: 2022/2/27
 */
@Configuration
public class HbbtvMimeMappingConfig implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory> {

    @Override
    public void customize(ConfigurableServletWebServerFactory factory) {
        MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
        mappings.add("apk", "application/vnd.android.package-archive");
        factory.setMimeMappings(mappings);
    }
}
